const { resolve } = require('path')

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'js/main_[contenthash:6].js',
    path: resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /(node_modules)|(sdk)/,
        loader: 'babelLoader',
        options: {
          presets: ['@babel/preset-env']
        }
      }
    ]
  },
  resolveLoader: {
    modules: [resolve(__dirname, './sdk'), 'node_modules']
  },
  mode: 'production'
}